﻿using Microsoft.Extensions.Configuration;
using MiniFox.Components;
using MiniFox.Configurations;
using System.Configuration;

namespace MiniFox.Scripting.Configurations
{
    /// <summary>
    /// 
    /// </summary>
    [Section(ELEMENT_NAME)]
    public class ScriptingConfiguration : IScriptingConfigProvider
    {
        internal const string ELEMENT_NAME = "minifox:scripting";

        /// <summary>
        /// 
        /// </summary>    
        [ConfigurationKeyName(FunctionSettingCollection.ELEMENT_NAME)]
        public FunctionSettingCollection Functions
        {
            get;
            set;
        } = new();
        /// <summary>
        /// 
        /// </summary>    
        [ConfigurationKeyName("containerType")]
        public string ContainerType
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        IFunctionSettingCollection IScriptingConfigProvider.Functions
        {
            get
            {
                return this.Functions;
            }
        }
    }
}
